from .base_card import Card
import random
class AttackCard(Card):
    @property
    def card_type(self) -> str:
        return "attack"

class Strike(AttackCard):
    def __init__(self):
        super().__init__(
            name="打击",
            cost=1,
            description="造成3点伤害"
        )
    
    def use(self, player, target):
        target.take_damage(3)

class DoubleStrike(AttackCard):
    def __init__(self):
        super().__init__(
            name="连击",
            cost=2,
            description="造成3点伤害两次"
        )
    
    def use(self, player, target):
        target.take_damage(3)
        target.take_damage(3) 

class Storm(AttackCard):
    def __init__(self):
        super().__init__(
            name="暴风",
            cost=3,
            description="造成3次伤害，每次逐渐增加"
        )
    
    def use(self, player, target):
        target.take_damage(2)
        target.take_damage(2)*random.randint(1,2)
        target.take_damage(3)*random.randint(1,2)

